package com.ccp.dev.im.dao;

import com.ccp.dev.core.basic.base.IBaseMapper;
import com.ccp.dev.core.basic.web.query.QueryFilter;
import com.ccp.dev.im.model.ImRoomMessage;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 群聊消息 信息数据库操作类
 */
@Mapper
public interface ImRoomMessageDao extends IBaseMapper<ImRoomMessage,String> {

    List<ImRoomMessage> queryAll(QueryFilter queryFilter);
    /**
     * 根据用户查找离线群组消息
     * @param params  params
     * @return  list
     */
    List<ImRoomMessage> queryUnReadMsgByUserId(Map params);
    /**
     * 根据群组id查询聊天消息
     * @param queryFilter  queryFilter
     * @return  list
     */
    List<Map<String,Object>> queryMsgByRoomId(QueryFilter queryFilter);

    /**
     * 某个群聊里面删除所有聊天记录
     *
     * @param roomId  群ID
     * @return 删除条数
     */
    int delByRoomId(String roomId);
}
